package com.eqdd.yiqidian.ui.gongneng.renshi.zuzhiguanli;

import android.view.View;

import com.eqdd.yiqidian.R;
import com.eqdd.yiqidian.bean.EnterBean;
import com.eqdd.yiqidian.ui.base.BaseEnterActivity;
import com.eqdd.yiqidian.utils.ToastUtil;
import com.eqdd.yiqidian.widget.ActionSheetDialog;

/**
 * Created by lvzhihao on 17-4-19.
 */

public class ZuzhiGuanliActivity extends BaseEnterActivity {
    private String[] contents = new String[]{
            "组织架构设置",
            // "工号设置",
            // "岗位职责描述",
            //  "流程查询"
    };
    private int[] icons = new int[]{
            R.mipmap.ic_launcher,
            R.mipmap.ic_launcher,
            R.mipmap.ic_launcher,
            R.mipmap.ic_launcher
    };
    private int[] decoders = new int[]{10};
    private Class[] classes = new Class[]{
            ZuzhijiagouShowActivity.class,
            // null,
            //ZhizemiaosuShowActivity.class,
            //null
    };
    private ActionSheetDialog bottomChoose;

    @Override
    public void itemClick(int p) {

//        if (p==3){
//            if (bottomChoose==null) {
//                bottomChoose = ChooseAlertView.getBottomChoose(ZuzhiGuanliActivity.this, null, new String[]{"转正申请", "岗位调动"}, new OnItemClickListener() {
//                    @Override
//                    public void onItemClick(Object o, int position) {
//
//                    }
//                });
//            }
//            bottomChoose.show();
//            return;
//        }
        if (classes[p] != null) {
            startActivity(classes[p]);
        } else {
            ToastUtil.showShort("该模块暂未开发");
        }
    }

    @Override
    public void initEnterData() {
        initTopTitleBar(View.VISIBLE, "组织管理");
        int index = 0;
        for (int i = 0; i < contents.length; i++) {
            EnterBean enterBean = new EnterBean();
            if (i == 0) {
                enterBean.setTop(false);
            }
            if (index < decoders.length && i == decoders[index]) {
                index++;
                enterBean.setBottom(true);
                enterBean.setUnderLine(false);
            }
            enterBean.setContent(contents[i]);
            enterBean.setIcon(false);

            enterBean.setEnter(true);
            enterBeans.add(enterBean);
        }
    }
}
